package com.zbkj.admin.disruptor;

import lombok.Builder;
import lombok.Data;

import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;

@Data
@Builder
public class ThreadPoolExecutorBuilder {

    /**
     * 默认核心线程数
     */
    private int defaultCoreSize;

    /**
     * 默认最大线程数
     */
    private int maxQueueSize;

    /**
     * 默认线程存活时间
     */
    private long keepAliveTime;

    /**
     * 默认线程存活时间单位
     */
    private TimeUnit unit;

    /**
     * 默认阻塞队列类型
     */
    private BlockingQueueTypeEnum blockingQueueTypeEnum;

    /**
     * 默认阻塞队列是否公平
     */
    private Boolean blockingQueueIsFair;

    /**
     * 默认队列初始化最大值
     */
    private int queueInitMaxSize;

    /**
     * 默认线程工厂
     */
    private ThreadFactory threadFactory;

    /**
     * 默认拒绝策略
     */
    private RejectedPolicyTypeEnum rejectedPolicyTypeEnum;




}
